<template>
  <div id="app">
    <keep-alive>
      <router-view v-if="$route.meta.keepAlive">
          <!-- 这里是会被缓存的视图组件，比如 page1,page2 -->
      </router-view>
    </keep-alive>

    <router-view v-if="!$route.meta.keepAlive">
        <!-- 这里是不被缓存的视图组件，比如 page3 -->
    </router-view>
    <!--图片预览-->
    <lg-preview></lg-preview>
  </div>
</template>

<script>
  export default {
    name: 'app'
    // created() {
    //   const useragent = navigator.userAgent
    //   if (useragent.match(/MicroMessenger/i) != 'MicroMessenger') {
    //     alert('已禁止本次访问：您必须使用微信内置浏览器访问本页面！')
    //     let opened = window.open('about:blank', '_self')
    //     opened.opener = null
    //     opened.close()
    //   }
    // }
  }
</script>

<style lang="scss">
</style>
